package com.ryan.ohos.extension.widget.expandablelist;

public class DataSetObservable extends Observable<DataSetObserver> {
    /**
     * notifyChanged
     */
    public void notifyChanged() {
        synchronized (mObservers) {

            for (int i = mObservers.size() - 1; i >= 0; i--) {
                mObservers.get(i).onChanged();
            }
        }
    }

    /**
     * notifyInvalidated
     */
    public void notifyInvalidated() {
        synchronized (mObservers) {
            for (int i = mObservers.size() - 1; i >= 0; i--) {
                mObservers.get(i).onInvalidated();
            }
        }
    }
}
